@extends('install.common.common')
@section('header')
    <li class="active"><a href="javascript:;">环境检测</a></li>
    <li><a href="javascript:;">参数设置</a></li>
    <li><a href="javascript:;">开始安装</a></li>
    <li><a href="javascript:;">安装完成</a></li>

@endsection

@section('content')
    <div class="col-xs-12 col-sm-8 col-sm-offset-2">
        <div class="panel panel-default">
            <div class="panel-heading">
                <span>环境检测</span>
            </div>
            <div class="panel-body">
                <table class="table table-hover">
                    <caption><h4>运行环境检查</h4></caption>
                    <thead>
                        <tr>
                            <th>项目</th>
                            <th>所需配置</th>
                            <th>当前配置</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($envInfo as $k=>$v)
                            <tr>
                                <td>{{$v['title']}}</td>
                                <td>{{$v['limit']}}</td>
                                <td><i class="fa {{$v['icon']}}"></i> {{$v['current']}}</td>
                            </tr>
                        @endforeach
                    </tbody>
                </table>
                <present name="check_dirfile">
                    <table class="table table-hover">
                        <caption><h4>目录、文件权限检查</h4></caption>
                        <thead>
                            <tr>
                                <th>目录/文件</th>
                                <th>所需状态</th>
                                <th>当前状态</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach($dirFileInfo as $k=>$v)
                                <tr>
                                    <td>{{$v['path']}}</td>
                                    <td><i class="fa fa-check text-success"></i> 可写</td>
                                    <td><i class="fa {{$v['icon']}}"></i> {{$v['title']}}</td>
                                </tr>
                            @endforeach
                        </tbody>
                    </table>
                </present>
                <table class="table table-hover">
                    <caption><h4>函数及扩展依赖性检查</h4></caption>
                    <thead>
                        <tr>
                            <th>名称</th>
                            <th>检查结果</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($funcAndExtInfo as $k=>$v)
                            <tr>
                                <td>{{$v['name']}}</td>
                                <td><i class="fa {{$v['icon']}}"></i> {{$v['title']}}</td>
                            </tr>
                        @endforeach
                    </tbody>
                </table>
                @if($adopt)
                <a class="btn btn-primary btn-block" href="{{url('/install/step2')}}">下一步</a>
                @else
                <button class="btn btn-primary  btn-block" disabled >环境检查不通过</button>
                @endif
            </div>
            <div class="panel-footer">
            </div>
        </div>
    </div>
@endsection
